{% extends 'base.html' %}

{% block extrahead %}
<style type="text/css">
    form#search_form input#id_location.focused {
        color: #000;
    }
</style>

<script type="text/javascript">

var input_default = 'Chicago Street Address or Zip Code';

function init_form() {
    if (document.getElementById) {
      var input = document.getElementById('id_location');

      if (input.value == '') {
        input.value = input_default;
      }
      else if (input.value != input_default) {
        input.className = 'focused';
      }
      input.onfocus = function() { 
          if (input.value == input_default) {
            input.value = '';
          }
          input.className = 'focused';
      }
      input.onblur = function() {
          if (input.value == '') {
            input.value = input_default;
            input.className = '';
          }
      }
    }
}
window.onload = function() {
    init_form();
}
</script>
{% endblock %}

{% block content %}
<form action="{% url repsheet_lookup %}" id="search_form">
<div>
{{ form.as_p }}
<input type="submit" value="Go" id="submit" />
</div>
</form>
{% if not_found %}<p class="errors">Sorry, can't find this place.</p>{% endif %}
{% endblock %}
